import WQRequest from "@/service";
export function getPersonnel(data) {
    return WQRequest.post({
        url: "account/getListPage",
        data
    });
}

export function getRole(data) {
    return WQRequest.post({
        url: "role/getAllList",
        data
    });
}

export function getDepartment() {
    return WQRequest.get({
        url: "dept/getAllList"
    });
}

export function addPersonnel(data) {
    return WQRequest.post({
        url: "account/add",
        data
    });
}

export function updatePersonnel(data) {
    return WQRequest.post({
        url: "account/update",
        data
    });
}

export function getSinglePersonnel(params) {
    return WQRequest.get({
        url: `account/detail/${params.userId}`
    });
}

export function setIsEnable(data) {
    return WQRequest.post({
        url: "account/activeSetting",
        data
    });
}

export function deletePersonnel(data) {
    return WQRequest.post({
        url: `account/delete/${data.userId}`,
        data
    });
}

export function setPassword(data) {
    return WQRequest.post({
        url: "account/resetPwd",
        data
    });
}
